import Class from '@/views/class.vue'
import Erji from '@/views/erji.vue'
import Home from '@/views/home.vue'
import Login from '@/views/login.vue'
import Register from '@/views/register.vue'
import Shop from '@/views/shop.vue'
import Shouye from '@/views/shouye.vue'
import Wode from '@/views/wode.vue'
import Xiangqing from '@/views/xiangqing.vue'
import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [

    {
      path: '/register',
      name: 'register',
      component: Register,
    },
    {
      path: '/register',
      name: 'register',
      component: Register,
    },
    {
      path: '/login',
      name: 'login',
      component: Login,
    },
    {
      path: '/home',
      name: 'home',
      component: Home,
      children: [
        {
          path: 'shouye',
          name: 'shouye',
          component: Shouye,
        }, {
          path: 'class',
          name: 'class',
          component: Class,
        }, {
          path: 'shop',
          name: 'shop',
          component: Shop,
        }, {
          path: 'wode',
          name: 'wode',
          component: Wode,
        },
      ]
    },
    {
      path: '/erji/:id',
      name: 'erji',
      component: Erji,
    },
    {
      path: '/xiangqing/:id',
      name: 'xiangqing',
      component: Xiangqing,
    },

  ],
})

export default router
